package com.kedacom.ctsp.authority.vo;

import com.kedacom.ctsp.authority.entity.Department;
import com.kedacom.ctsp.authority.entity.Role;
import com.kedacom.ctsp.authority.entity.User;
import com.kedacom.ctsp.lang.mapper.BeanMapper;
import com.kedacom.ctsp.lang.mapper.BeanMapperException;
import com.kedacom.ctsp.lang.mapper.CollComponentType;
import com.kedacom.ctsp.lang.mapper.MapperField;
import com.kedacom.ctsp.web.entity.SortSupportBean;
import com.kedacom.ctsp.web.vo.AbstractCrudVO;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.collections.CollectionUtils;

import java.util.IllegalFormatException;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 角色
 *
 * @author
 */
@Data
@ApiModel("角色")
public class SimpleRoleVO extends AbstractCrudVO<Role, String> implements RoleVO, SortSupportBean {
    /**
     * 主键id ，自增长
     */
    private String id;

    private String name;

    private String sign;

    private String description;

    private Long sortIndex;
    /**
     * 扩展字段
     */
    private String extendedField;
    /**
     * 用户
     */
    @CollComponentType(UserVO.class)
    @MapperField(convertTo = false)
    private List<UserVO> users;

    /**
     * 客户端标识
     */
    private String clientSign;


}
